package main

func test(index int)  {
	var arr [2]int
	arr[index] = 100
}

func main() {
	// 数组越界异常
	test(2)// panic: runtime error: index out of range
}
